Skip to content

[fix] API version check comes before method check#4152

Merged
battermann merged 2 commits intodevelopfrom
battermann/fix-api-version-check
Jul 16, 2024
Merged

[fix] API version check comes before method check#4152
battermann merged 2 commits intodevelopfrom
battermann/fix-api-version-check

Conversation

@battermann
Copy link
Contributor

@battermann battermann commented Jul 15, 2024

Because the API version check is done via a version header and servant's order of checks while resolving the routes is fixed. E.g. it can happen that an endpoint with the same path, but different method matches the request even if it has a different version, and then fails with 405 instead of 404.

This change is a hack to enforce the version check to come first.

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jul 15, 2024
@battermann battermann marked this pull request as ready for review July 15, 2024 14:26
@mdimjasevic mdimjasevic force-pushed the battermann/fix-api-version-check branch from b28a259 to 7dc3048 Compare July 16, 2024 07:43
@mdimjasevic
Copy link
Contributor

Federation tests were failing in the CI and I suppose for no good reason. I used the opportunity to rebase the PR on top of develop and to retrigger the CI.

@battermann battermann merged commit 6afbea8 into develop Jul 16, 2024
@battermann battermann deleted the battermann/fix-api-version-check branch July 16, 2024 09:16
@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

echoes: unplanned Any work item that isn’t part of the product or technical roadmap. ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants